<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=no" name="viewport">
<meta charset="UTF-8">
<style>
a{
  text-decoration:none;
  color:orange;
}
.menu{
  width:14px;
  position:fixed;
  right:0px;
  top:60px;
  font-size:12px;
  color:orange;
}
.zimu{
  display:flex;
  justify-content:space-between;
  align-items:center;
  height:40px;
  background:#eee;
}
.country{
  display:flex;
  justify-content:space-between;
  align-items:center;
  height:40px;
  border-bottom:1px solid #ccc;
  padding-right:20px;
}
</style>

<script>
 var provinces = {"*":[{"中国":"86"},{"中国香港":"852"},{"中国澳门":"853"},{"中国台湾":"886"},{"新加坡":"65"},{"马来西亚":"60"},{"澳大利亚":"61"},{"加拿大":"1"},{"美国":"1"},{"新西兰":"64"},{"日本":"81"},{"韩国":"82"}],"A":[{"阿尔巴尼亚":"355"},{"阿尔及利亚":"213"},{"阿富汗":"93"},{"阿根廷":"54"},{"爱尔兰":"353"},{"埃及":"20"},{"爱沙尼亚":"372"},{"埃塞俄比亚":"251"},{"阿联酋":"971"},{"阿鲁巴":"297"},{"阿曼":"968"},{"安道尔":"376"},{"安哥拉":"244"},{"安圭拉":"1264"},{"安提瓜和巴布达":"1268"},{"澳大利亚":"61"},{"奥地利":"43"},{"阿塞拜疆":"994"}],"B":[{"巴巴多斯":"1268"},{"巴布亚新几内亚":"675"},{"巴哈马":"1242"},{"白俄罗斯":"375"},{"百慕大三角":"1441"},{"巴基斯坦":"92"},{"巴拉圭":"595"},{"巴林":"973"},{"巴拿马":"507"},{"保加利亚":"359"},{"巴西":"55"},{"贝宁":"229"},{"比利时":"32"},{"冰岛":"354"},{"博茨瓦纳":"267"},{"波多黎各":"1787"},{"波兰":"48"},{"玻利维亚":"591"},{"伯利兹":"501"},{"波斯尼亚和黑塞哥维那":"387"},{"不丹":"975"},{"布基纳法索":"226"},{"布隆迪":"257"}],"C":[{"赤道几内亚":"240"}],"D":[{"丹麦":"45"},{"德国":"49"},{"东帝汶":"670"},{"多哥":"228"},{"多米尼加共和国":"1767"}],"E":[{"厄立特里亚":"291"},{"俄罗斯":"7"}],"F":[{"法国":"33"},{"法罗群岛":"298"},{"法属圭亚那":"594"},{"斐济群岛":"679"},{"菲律宾":"63"},{"芬兰":"358"},{"佛得角":"238"}],"G":[{"冈比亚":"220"},{"格陵兰":"299"},{"格林纳达":"1473"},{"格鲁吉亚":"995"},{"哥伦比亚":"57"},{"哥斯达黎加":"506"},{"瓜德罗普":"590"},{"关岛":"1671"},{"古巴":"53"},{"圭亚那":"592"}],"H":[{"韩国":"82"},{"海地":"509"},{"哈萨克斯坦":"7"},{"黑山":"382"},{"荷兰":"31"},{"洪都拉斯":"504"}],"J":[{"加纳":"233"},{"加拿大":"1"},{"柬埔寨":"855"},{"加蓬":"241"},{"吉布提":"253"},{"捷克":"420"},{"吉尔吉斯斯坦":"996"},{"津巴布韦":"263"},{"几内亚":"224"},{"几内亚比绍":"245"}],"K":[{"开曼群岛":"1345"},{"喀麦隆":"237"},{"卡塔尔":"974"},{"克罗地亚":"385"},{"科摩罗":"269"},{"肯尼亚":"254"},{"科特迪瓦":"225"},{"科威特":"965"},{"库克群岛":"682"}],"L":[{"莱索托":"266"},{"老挝":"856"},{"拉脱维亚":"371"},{"黎巴嫩":"961"},{"利比里亚":"231"},{"利比亚":"218"},{"列支敦士登":"4175"},{"立陶宛":"370"},{"罗马尼亚":"40"},{"卢森堡":"352"},{"卢旺达":"250"}],"M":[{"马达加斯加":"261"},{"马尔代夫":"960"},{"马耳他":"356"},{"马来西亚":"60"},{"马拉维":"265"},{"马里":"223"},{"毛里求斯":"230"},{"毛里塔尼亚":"222"},{"马其顿":"389"},{"马提尼克":"596"},{"美国":"1"},{"美属萨摩亚":"684"},{"美属维尔京群岛":"1340"},{"蒙古":"976"},{"孟加拉":"880"},{"蒙特塞拉特":"1664"},{"密克罗尼西亚":"691"},{"秘鲁":"51"},{"摩尔多瓦":"373"},{"摩洛哥":"212"},{"摩纳哥":"377"},{"莫桑比克":"258"},{"墨西哥":"52"}],"N":[{"纳米比亚":"0264"},{"南非":"27"},{"厄瓜多尔":"593"},{"南苏丹":"211"},{"尼泊尔":"977"},{"尼加拉瓜":"505"},{"尼日尔":"227"},{"尼日利亚":"234"},{"挪威":"47"}],"P":[{"帕劳":"680"},{"葡萄牙":"351"}],"R":[{"日本":"81"},{"瑞典":"46"},{"瑞士":"41"}],"S":[{"萨尔瓦多":"503"},{"塞尔维亚":"381"},{"塞拉利昂":"232"},{"塞内加尔":"221"},{"塞浦路斯":"357"},{"塞舌尔":"248"},{"萨摩亚":"685"},{"沙特阿拉伯":"966"},{"圣多美和普林西比":"239"},{"圣基茨和尼维斯":"1869"},{"圣卢西亚":"1758"},{"圣马力诺":"378"},{"圣文森特和格林纳丁斯":"1784"},{"斯里兰卡":"94"},{"斯洛伐克":"421"},{"斯洛文尼亚":"386"},{"斯威士兰":"0268"},{"苏丹":"249"},{"苏里南":"597"},{"所罗门群岛":"677"},{"索马里":"252"}],"T":[{"泰国":"66"},{"汤加":"676"},{"坦桑尼亚":"255"},{"塔吉克斯坦":"992"},{"特克斯和凯科斯群岛":"1649"},{"特立尼达和多巴哥":"1868"},{"土耳其":"90"},{"突尼斯":"216"},{"图瓦卢":"688"}],"W":[{"瓦努阿图":"678"},{"危地马拉":"502"},{"委内瑞拉":"58"},{"文莱":"673"},{"乌干达":"256"},{"乌克兰":"380"},{"乌拉圭":"598"},{"乌兹别克斯坦":"998"}],"X":[{"西班牙":"34"},{"希腊":"30"},{"新加坡":"65"},{"新喀里多尼亚":"687"},{"新西兰":"64"},{"匈牙利":"36"},{"叙利亚":"963"}],"Y":[{"牙买加":"1876"},{"亚美尼亚":"374"},{"也门":"967"},{"意大利":"39"},{"伊拉克":"964"},{"伊朗":"98"},{"印度":"91"},{"印度尼西亚":"62"},{"英国":"44"},{"英属维尔京群岛":"1284"},{"以色列":"972"},{"约旦":"962"},{"越南":"84"}],"Z":[{"赞比亚":"260"},{"乍得":"235"},{"智利":"56"},{"中非":"236"},{"中国":"86"},{"中国澳门":"853"},{"中国台湾":"886"},{"中国香港":"852"}]};

document.write("<div class='menu'>");
for(p in provinces){
  document.write("<div><a href='#"+p+"'>"+p+"</a></div>")
}
document.write("</div>");


for(p in provinces){
  var arr = provinces[p];
  document.write("<div class='zimu' id='"+p+"'>"+p+"</div>");
  for(var i=0;i<arr.length;i++){
    var os = arr[i];
    for(o in os){
      document.write("<div onclick='selectCountry("+os[o]+")' class='country'><span>"+o+"</span><span>+"+os[o]+"</span></div>");
    }
  }
}


function selectCountry(c){
  //console.log(c);
  localStorage.countryNo = c;
  location = "index.html"; 
 // 本地存储 页面传值 
 // 本地存储 localStorage,  永久存储
 // 会话存储 sessionStorage 临时存储【关闭浏览器即失效】
}






</script>





